<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>基础框架</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../assets/css/reset.css"/>
<link rel="stylesheet" href="../../../assets/css/examples.css"/>

</head>
<body>
<h2>基础组件</h2>
<ul id="jichu">
    <li data-url="examples/setHeader/index.html" data-title="setHeader">标题(setHeader)</li>
    <li data-url="examples/loading/index.html" data-title="Loading">加载动画(loading)</li>
    <li data-url="examples/dialog/index.html" data-title="dialog">弹出对话框(dialog)</li>
    <li data-url="examples/request/index.html" data-title="request">网络请求(request)</li>
    <li data-url="examples/page/index.html" data-title="page">页面跳转(page)</li>
    <li data-url="examples/device/index.html" data-title="device">机器设备号(device)</li>
    <li data-url="examples/data/index.html" data-title="data">本地存储(data)</li>
</ul>

<h2>可扩展组件（暂未集成）</h2>
<ul id="kuozhan">
    <li data-url11="examples/pull/index.html" data-title="pull">上下拉刷新(pull)</li>
    <li data-url11="examples/datatime/index.html" data-title="datatime">日期控件(datatime)</li>
    <li data-url11="examples/city/index.html" data-title="city">城市选择控件(city)</li>
    <li data-url11="examples/keyboard/index.html" data-title="keybord">键盘(keyboard)</li>
    <li data-url11="examples/keyboard/index.html" data-title="keybord">分享(share)</li>
    <li data-url11="examples/keyboard/index.html" data-title="keybord">经纬度(location)</li>
    <li data-url11="examples/keyboard/index.html" data-title="keybord">密码(password)</li>
</ul>

<script type="text/template" id="xxx">

</script>



<script  src="../../../../core/$$.js"></script>
<script  src="../../../../core/libs/zepto/zepto.min.js"></script>
<script  src="../../../../core/libs/zepto/selector.js"></script>
<script  src="../../../../core/libs/zepto/touch.js"></script>
<script  src="../../../../core/libs/underscore-min.js"></script>
<script  src="../../../../core/libs/oop.js"></script>
<script  src="../../../../core/extend/prototype.js"></script>
<script  src="../../../../core/extend/function.js"></script>
<script  src="../../../../core/native/platformAdapter.js"></script>
<script  src="../../../../core/native/api.js"></script>
<script  src="../../../../core/native/eventListener.js"></script>
<script  src="../../classes/XX.js"></script>
<script  src="../../classes/common.js"></script>
<script  src="../../../config/url/dev.js"></script>
<script type="text/javascript">
    $class('MyClass').extends('XX').via(function () {
        $$.Native.setHeader({
            isBack:false,
            title: "demo",
            isClose : false
        });
        this.events = {
            'click p': 'clickBody'
        };
        this.handlers = {
            clickBody: function () {
                console.dir(this);
                console.dir(arguments);
            }
        };
    });
    $("#jichu").on("tap","li",function(){
        var url,title;
        var ua = navigator.userAgent.toLowerCase(), toString = Object.prototype.toString, slice = Array.prototype.slice;
    // 定义平台适配器
        url = $(this).attr("data-url");
        title = $(this).attr("data-title");
        if(ua.indexOf('android') != -1 || ua.indexOf('iphone os') != -1 || ua.indexOf('ipad') != -1){
            $$.Native.forward({
                url:url,
                title:title
            });
        }else{
            window.location.href="../" + url;
        }

    });

    $("#kuozhan").on("tap","li",function(){
        var url,title;
        var ua = navigator.userAgent.toLowerCase(), toString = Object.prototype.toString, slice = Array.prototype.slice;
    // 定义平台适配器
        url = $(this).attr("data-url");
        title = $(this).attr("data-title");
        if(ua.indexOf('android') != -1 || ua.indexOf('iphone os') != -1 || ua.indexOf('ipad') != -1){
            $$.Native.forward({
                url:url,
                title:title
            });
        }else{
            window.location.href="../" + url;
        }

    });
        
    var obj = new MyClass();

</script>
</body>
</html>